package com.gxa.eshop.enums;

/**
 * @author bill
 * @date 2022/8/11 14:39
 */
/**
 * Created by bill on 2020/11/16
 **/
public enum ErrorCode {
    // 把需要的异常信息编排在这里
    ERROR(50000,"对不起，系统开小差了!"),
    ID_EMPTY(50001,"id不能为空!"),
    USERNAME_EMPTY(50002,"用户名不能为空!"),
    GOODS_STATUS(50003,"不能乱传商品状态哦!"),
    CATEGORY_NOT_EXITS(50004,"商品分类不存在!"),
    BANNER_INDEX_QUANTITY(50005,"首页轮播数量有问题!"),
    GOOODS_IS_EMPTY(50006,"商品不存在!"),
    LOGIN_SMS_EXPIRE(50007,"手机验证码失效!"),
    LOGIN_SMS_ERROR(50008,"手机验输入错误!"),
    USER_NO(50009,"对不起，账户不能登录"),
    TOKEN_NO(50010,"无效token");
    //错误编码
    private Integer code;
    //错误信息
    private String message;
    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}